﻿Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.Runtime.Serialization
Imports System.ComponentModel


Partial Public Class TransactionsWP7
    Implements INotifyPropertyChanged


    Public Overridable Property TransactionID() As Integer


    Private _TransactionDate As Nullable(Of Date)

    Public Property TransactionDate As Nullable(Of Date)
        Get
            Return _TransactionDate
        End Get
        Set(ByVal value As Nullable(Of Date))
            _TransactionDate = value
            OnPropertyChanged("TransactionDate")
        End Set
    End Property

    Private _TransactionAmount As Nullable(Of Decimal)

    Public Property TransactionAmount As Nullable(Of Decimal)
        Get
            Return _TransactionAmount
        End Get
        Set(ByVal value As Nullable(Of Decimal))
            _TransactionAmount = value
            OnPropertyChanged("TransactionAmount")
        End Set
    End Property

    Private _TransactionDescription As String

    Public Property TransactionDescription As String
        Get
            Return _TransactionDescription
        End Get
        Set(ByVal value As String)
            _TransactionDescription = value
            OnPropertyChanged("TransactionDescription")
        End Set
    End Property

    Private _TransactionTypeDesc As String

    Public Property TransactionTypeDesc As String
        Get
            Return _TransactionTypeDesc
        End Get
        Set(ByVal value As String)
            _TransactionTypeDesc = value
            OnPropertyChanged("TransactionTypeDesc")
        End Set
    End Property

    Public Sub New()
    End Sub

    Public Sub New(TransactionID As Integer, _
                   TransactionDate As Date, _
                   TransactionAmount As Decimal, _
                   TransactionDescription As String, _
                   TransactionTypeDesc As String)
        _TransactionID = TransactionID
        _TransactionDate = TransactionDate
        _TransactionAmount = TransactionAmount
        _TransactionDescription = TransactionDescription
        _TransactionTypeDesc = TransactionTypeDesc
    End Sub

    Public Sub OnPropertyChanged(ByVal propertyName As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
    End Sub

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged

End Class
